//
//  DetailModel.m
//  iNews
//
//  Created by lanou3g on 14-12-10.
//  Copyright (c) 2014年 张在青. All rights reserved.
//

#import "DetailModel.h"

@implementation DetailModel
- (void)dealloc
{
    [_title release];
    [_source release];
    [_ptime release];
    [_body release];
    [_img release];
    [_photos release];
    [_setname release];
    [_docid release];
    [_postid release];
    
    [super dealloc];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}


//归档反归档方法(自动调用) (需要遵循NSCoding协议)
- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.source = [aDecoder decodeObjectForKey:@"source"];
        self.ptime = [aDecoder decodeObjectForKey:@"ptime"];
        self.body = [aDecoder decodeObjectForKey:@"body"];
        self.img = [aDecoder decodeObjectForKey:@"img"];
        self.photos = [aDecoder decodeObjectForKey:@"photos"];
        self.setname = [aDecoder decodeObjectForKey:@"setname"];
        self.docid = [aDecoder decodeObjectForKey:@"docid"];
    }
    return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.source forKey:@"source"];
    [aCoder encodeObject:self.ptime forKey:@"ptime"];
    [aCoder encodeObject:self.body forKey:@"body"];
    [aCoder encodeObject:self.img forKey:@"img"];
    [aCoder encodeObject:self.setname forKey:@"setname"];
    [aCoder encodeObject:self.photos forKey:@"photos"];
    [aCoder encodeObject:self.docid forKey:@"docid"];
    
}










@end
